package cn.t.web.android;

import cn.t.annotation.Runtime;
import cn.t.dto.android.AndroidCostCenterDTO;
import cn.t.facade.user.CostCenterFacade;
import cn.t.vo.andriod.AndroidCostCenterVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 设备端成本中心服务入口
 *
 * @author s
 * @since 2024-07-05
 */
@Slf4j
@RestController
@RequestMapping("runtime/costCenter")
// "设备端成本中心服务")
@AllArgsConstructor
@Runtime
public class AndroidCostCenterController {

    private final CostCenterFacade facade;

    /**
     * 设备端成本中心查询接口
     */
    @PostMapping(value = "/findByFirm")
    public List<AndroidCostCenterVO> findByFirm(@RequestBody AndroidCostCenterDTO req) {
        return facade.findByFirmId(req.getFirmId());
    }

}

